<template>
	<div>
		<div  style="width: 100%;">
			<div style="color: #409EFF;font-size: 20px;margin: 10px 0;">订单列表</div>
			<el-table :data="formData.orderlist" style="width: 100%" max-height="400">
				<el-table-column align="center" label="会员昵称" prop="wxName" />
				<el-table-column align="center" label="订单号" prop="order_sn" width="180px" />
				<el-table-column width="120px" align="center" label="电话号码" prop="mainPhone" />
				<el-table-column align="center" width="120px" label="订单总金额" prop="total_money" />
				<!-- <el-table-column align="center" width="100px" label="运费" prop="freight_money" /> -->
				<el-table-column align="center" label="支付金额" prop="pay_money" width="120px" />
				<el-table-column align="center" label="下单时间" prop="addtime" width="180px">
					<template slot-scope="{row}">
						{{ row.addtime | formatDate }}
					</template>
				</el-table-column>
				<el-table-column align="center" label="支付时间" prop="pay_time" width="180px">
					<template slot-scope="{row}">
						
						<span v-if="row.pay_time">{{ row.pay_time | formatDate }}</span>
					</template>
				</el-table-column>
				<el-table-column align="center" label="订单状态" prop="status" width="120px">
					<template slot-scope="{row}"> 
						<!-- // 0待付款 1待发货 2待收货 3待评价 4已取消 5售后退款中 6已完成 7售后完成 -->
						<el-tag v-if="row.status == 2">待收货</el-tag>
						<el-tag v-if="row.status == 7" type="success">售后完成</el-tag>
						<el-tag v-if="row.status == 6" type="success">已完成</el-tag>
						<el-tag v-if="row.status == 4" type="info">已取消</el-tag>
						<el-tag v-if="row.status == 1" type="warning">待发货</el-tag>
						<el-tag v-if="row.status == 3" type="warning">待评价</el-tag>
						<el-tag v-if="row.status == 5" type="danger">售后退款中</el-tag>
					</template>
				</el-table-column>
				<el-table-column align="center" label="订单类型" prop="delivery_method" width="120px">
					<template slot-scope="{row}">
						<!-- //delivery_method =1配送订单delivery_method =2自提订单-->
						<!-- order_type1 商品订单  2到店支付订单   这个是订单类型 -->
						<el-tag v-if="row.order_type == 1">商品订单</el-tag>
						<el-tag v-if="row.order_type == 2" type="success">到店支付订单</el-tag>
					</template>
				</el-table-column>
				<el-table-column align="center" label="支付状态" prop="pay_status" width="120px">
					<template slot-scope="{row}">
						<!-- // 0未支付 1已支付 -->
						<el-tag v-if="row.pay_status == 1" type="success">已支付</el-tag>
						<el-tag v-if="row.pay_status == 0" type="warning">未支付</el-tag>
					</template>
				</el-table-column>
			</el-table>
		</div>
		<div  style="width: 100%,">
			<div style="color: #409EFF;font-size: 20px;margin: 10px 0;">优惠券列表</div>
			<el-table :data="formData.couponlist" style="width: 100%" max-height="400">
				<el-table-column show-overflow-tooltip label="优惠券名称" prop="coupon_name" align="center"></el-table-column>
				<el-table-column label="类型" prop="coupon_type" align="center" width="80px">
				    <template slot-scope="{ row }">
				        {{ row.coupon_type | formatCouponType }}
				    </template>
				</el-table-column>
				<el-table-column label="金额" prop="coupon_money" align="center">
					<!-- row.coupon_type==2 折扣劵 discount_percent 折扣券折扣-->
					<template slot-scope="{ row }">
					    
						<div v-if="row.coupon_type==2">{{row.discount_percent/10}}折</div>
						<div v-else>{{ row.coupon_money}}</div>
					</template>
				</el-table-column>
				<el-table-column label="消费门槛" prop="usable_money" align="center" width="120px"></el-table-column>
				<!-- <el-table-column label="发放数量" prop="coupon_num" align="center" width="120px"></el-table-column> -->
				<el-table-column label="领取开始时间" prop="addtime" align="center" width="150px">
				    <template slot-scope="{ row }">
				        {{ row.addtime | formatDate }}
				    </template>
				</el-table-column>
				<el-table-column label="使用时间" prop="expire_time" align="center" width="150px">
				    <template slot-scope="{ row }">
				        {{ row.expire_time | formatDate  }}
				    </template>
				</el-table-column>
				<!-- 状态status /城态0未使用 1已使用,2已过期-->
				<el-table-column align="center" label="状态" prop="status" width="80px">
					<template slot-scope="{ row }">
					<el-tag v-if="row.status==0">未使用</el-tag>
					<el-tag  v-if="row.status==1" type="success">未使用</el-tag>
					<el-tag  v-if="row.status==2" type="danger">已过期</el-tag>
					</template>
				</el-table-column>
				<!-- <el-table-column label="过期方式" prop="expire_type" align="center">
				    <template slot-scope="{ row }">
				        {{ row.expire_type | formatExpireType }}
				    </template>
				</el-table-column> -->
			</el-table>
		</div>
		<div  style="width: 100%,">
			<div style="color: #409EFF;font-size: 20px;margin: 10px 0;">充值列表</div>
			<el-table :data="formData.rechargelist" style="width: 100%" max-height="400">
				<el-table-column align="center" width="180px" label="卡号" prop="card_no" />
				<!-- <el-table-column align="center" width="120px" label="卡内余额" prop="acc_bal" /> -->
				<el-table-column align="center" label="充值单号" prop="order_sn" />
				<el-table-column align="center" width="120px" label="充值金额" prop="money" />
				
				<el-table-column align="center" width="180px" label="上游流水号" prop="trade_no" />
				<el-table-column align="center" label="充值时间" prop="addtime">
				    <template slot-scope="{row}">
				        {{row.createtime|formatDate}}
				    </template>
				</el-table-column>
			</el-table>
		</div>
		<div  style="width: 100%">
			<div style="color: #409EFF;font-size: 20px;margin: 10px 0;">停车场列表</div>
			<el-table :data="formData.carlist" style="width: 100%" max-height="400">
				<el-table-column width="100px" align="center" label="用户昵称" prop="wxName" />
				<el-table-column width="120px" align="center" label="手机号" prop="mainPhone" />
				<el-table-column align="center" width="180px" label="车牌号" prop="carNo" />
				<el-table-column align="center" width="120px" label="入口" prop="gateName" />
				<el-table-column align="center" width="120px" label="停车场" prop="operatorName" />
				<el-table-column align="center" width="120px" label="金额" prop="totalAmount" />
				<!--  1 pos余额支付 2 帐户余额支付 3 微信支付 -->
				<el-table-column align="center" label="支付方式" prop="payType">
				    <template slot-scope="{row}">
				        <el-tag v-if="row.payType==1">pos余额支付</el-tag>
				        <el-tag v-if="row.payType==2" type="success">帐户余额支付</el-tag>
				        <el-tag v-if="row.payType==3" type="info">微信支付</el-tag>
				    </template>
				</el-table-column>
				<!-- payStatus  再加个支付状态  0未支付  1已支付 -->
				<el-table-column align="center" label="支付状态" prop="payStatus">
				    <template slot-scope="{row}">
				        <el-tag v-if="row.payType==0">未支付</el-tag>
				        <el-tag v-if="row.payType==1" type="success">已支付</el-tag>
				    </template>
				</el-table-column>
				<el-table-column align="center" label="进场时间" prop="addtime">
				    <template slot-scope="{row}">
				        {{row.enterTime}}
				    </template>
				</el-table-column>
				<el-table-column align="center" label="出场时间" prop="outTime">
				    <template slot-scope="{row}">
				        {{row.outTime}}
				    </template>
				</el-table-column>
			</el-table>
		</div>
	</div>
</template>

<script>
	import {
		imghttp,
		get,
		post,
		del
	} from '@/assets/js/http'
	// import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
	export default {
		name: "member-info",
		props: {
			formData: {
				type: Object,
				default: () => {}
			},
		},
		filters: {
		    formatCouponType(type) {
		        if (type == 1) {
		            return "满减券";
		        }
		        if (type == 2) {
		            return "折扣券";
		        }
				if (type == 3) {
				                return "现金劵";
				            }
		    },
		    formatExpireType(type) {
		        if (type == 1) {
		            return "固定时间区间";
		        }
		        if (type == 2) {
		            return "领取后多少天内过期";
		        }
		    }
		},
		components: {
			// "el-upload-image": () => import("@/components/el-upload-image.vue"),
			// "maps": () => import("@/components/map/index.vue"),
			// Editor,
			// Toolbar
		},
		mounted() {
			// this.getcommuity() 
		},
		data() {
			return {};
		},
		methods: {

		}
	};
</script>
<!-- <style src="@wangeditor/editor/dist/css/style.css"></style> -->